package com.trg.designmodel.composite.application;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: ProdcutComposite
 * @Description:    产品类别节点
 * @Author: tangrg
 * @Date: 2021/7/7 14:21
 * @Version: 1.0
 * @Return:
 **/
public class ProdcutComposite extends ModelComponent {

    public ProdcutComposite(String id, String label) {
        super(id, label);
    }

    List<ModelComponent> children =  new ArrayList<ModelComponent>();

    @Override
    public void add(ModelComponent modelComponent) {
        children.add(modelComponent);
    }

    @Override
    public void remove(ModelComponent modelComponent) {
        children.remove(modelComponent);
    }
}
